package com.zhang.entity;

public class OrderItem {
    private Integer id;
    private Integer product_id;
    private Integer order_id;
    private Integer count;
    private Double price;
    private Product product;

    @Override
    public String toString() {
        return "OrderItem{" +
                "id=" + id +
                ", product_id=" + product_id +
                ", order_id=" + order_id +
                ", count=" + count +
                ", price=" + price +
                '}';
    }

    public Product getProduct() {
        return product;
    }

    public void setProduct(Product product) {
        this.product = product;
    }

    public OrderItem(Integer id, Integer product_id, Integer order_id, Integer count, Double price, Product product) {
        this.id = id;
        this.product_id = product_id;
        this.order_id = order_id;
        this.count = count;
        this.price = price;
        this.product = product;
    }

    public OrderItem() {
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getProduct_id() {
        return product_id;
    }

    public void setProduct_id(Integer product_id) {
        this.product_id = product_id;
    }

    public Integer getOrder_id() {
        return order_id;
    }

    public void setOrder_id(Integer order_id) {
        this.order_id = order_id;
    }

    public Integer getCount() {
        return count;
    }

    public void setCount(Integer count) {
        this.count = count;
    }

    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

    public OrderItem(Integer id, Integer product_id, Integer order_id, Integer count, Double price) {
        this.id = id;
        this.product_id = product_id;
        this.order_id = order_id;
        this.count = count;
        this.price = price;
    }
}
